<extend name="Layout:list" />
<block name="title"><title>管理员管理</title></block>
<block name="main">
    <div class="table-list">
        <form name="myform" id="myform" action="" method="post">
            <table width="100%" cellspacing="0">
                <thead>
                    <tr>
                        <th width="10%">序号</th>
                        <th width="10%" align="left">用户名</th>
                        <th width="10%" align="left">所属角色</th>
                        <th width="10%" align="left">最后登录IP</th>
                        <th width="20%" align="left">最后登录时间</th>
                        <th width="15%" align="left">E-mail</th>
                        <th width="10%">真实姓名</th>
                        <th width="15%">管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($users as $key => $user) { ?>
                    <tr>
                        <td width="10%" align="center"><?php echo $user['id']; ?></td>
                        <td width="10%"><?php echo $user['account']; ?></td>
                        <td width="10%"><?php echo $user['name']; ?></td>
                        <td width="10%"><?php echo $user['last_login_ip']; ?></td>
                        <td width="20%"><?php echo date('Y-m-d H:i:s', $user['last_login_time']); ?></td>
                        <td width="15%"><?php echo $user['email']; ?></td>
                        <td width="10%" align="center"><?php echo $user['realname']; ?></td>
                        <td width="15%" align="center">
                            <a href="__MODULE__/User/edit/id/<?php echo $user['id']; ?>">修改</a> |
                            <?php if($user['role_id'] != 1) { ?>
                            <a onclick="return ConfirmDel();" href="__MODULE__/User/del/id/<?php echo $user['id']; ?>">删除</a>
                            <?php } else { ?>
                            <font color="#cccccc">删除</font>
                            <?php } ?>
                        </td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>
        </form>
    </div>
</block>